import uniWrapper from "../uniWrapper";
// 记录路由的跳转信息，避免刷新后，左侧栏的激活对象丢失
const state = {
    routeValue: '',  // 当前的激活值
    // 晚点把左侧路由地址也配置在这里

}

const mutations = {
    SET_ROUTER: (state, routeValue) => {
        state.routeValue = routeValue
        uniWrapper.setUniCache('routeValue', routeValue)
    }
}

const actions = {
    setRouteValue({ commit }, value) {
        commit('SET_ROUTER', value)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}
